﻿@model Bricks.Site.Models.ExpenseView
@{
    ViewBag.Title = "Expense";
    Layout = "~/Views/Shared/_UserPage.cshtml";
}
@*引入uEditor*@
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/ueditor.all.js"> </script>
<script type="text/javascript" charset="utf-8" src="/Res/ueditor/lang/zh-cn/zh-cn.js"></script>

<script src="@Url.Content("~/Res/Views/Expense.js")"></script>


<div class="easyui-panel" fit="true">
    <div id="divExpenseRequest" class="easyui-tabs" fit="true" data-options="onSelect:PreviewProcessGraph">
        <div title="付款申请明细" data-options="iconCls:'icon-none'" style="padding: 2px;">
            <div style="min-width: 1200px; overflow: auto">
                <div style="border: 1px solid #ddd; margin-bottom: 3px;">
                    <div id="myTreeToolBar">
                        @Html.Raw(ViewBag.ToolBarInfo)
                        <a href="#" id="btnCancel" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-ok'" onclick="CloseSelf();">关闭</a>
                    </div>
                </div>
                <div style="height: 655px; overflow-y: scroll; ">
                    <div class="easyui-layout" style="min-height: 1300px;">
                        <div region="center" border="false">
                            <div class="easyui-layout" fit="true">
                                <div region="north" split="true" style="width: auto; height: 300px; padding: 1px;">
                                    <form id="frmExpense" method="post" style="min-width: 850px">
                                        <input type="hidden" id="hid" name="ID" value="@Model.ID" />
                                        <input type="hidden" id="hExpenseID" name="ExpenseID" value="@Model.ExpenseID" />
                                        <input type="hidden" id="hFlowCode" name="FlowCode" value="@Model.FlowCode" />
                                        <input type="hidden" id="hProjectID" name="ProjectID" value="@Model.ProjectID" />
                                        <input type="hidden" id="hContractID" name="ContractID" value="@Model.ContractID" />
                                        <input type="hidden" id="hContractSource" name="ContractSource" value="@Model.ContractSource" />

                                        <input type="hidden" id="hHandleState" name="HandleState" value="@Model.HandleState" />
                                        <input type="hidden" id="hAssociatedNodeCode" name="AssociatedNodeCode" value="@Model.AssociatedNodeCode" />
                                        <input type="hidden" id="hLastUpdateUserDepartment" name="LastUpdateUserDepartment" value="@Model.LastUpdateUserDepartment" />
                                        <input type="hidden" id="hLastUpdateUser" name="LastUpdateUser" value="@Model.LastUpdateUser" />

                                        <input type="hidden" id="hExpenseBillListJson" name="ExpenseBillListJson" value="@Model.ExpenseBillListJson" />
                                        <input type="hidden" id="hSourceType" name="SourceType" value="@Model.SourceType" />
                                        <input type="hidden" id="hProcessType" name="ProcessType" value="@Model.ProcessType" />
                                        <input type="hidden" id="hSourceID" name="SourceID" value="@Model.SourceID" />
                                        <input type="hidden" id="hProcessdOrCirculatedNodeCode" name="ProcessdOrCirculatedNodeCode" value="@Model.ProcessdOrCirculatedNodeCode" />
                                        <input type="hidden" id="hProcessdOrCirculatedUserDepartment" name="ProcessdOrCirculatedUserDepartment" value="@Model.ProcessdOrCirculatedUserDepartment" />
                                        <input type="hidden" id="hContractStages" name="ContractStages" value="@Model.ContractStages" /> @*期次*@
                                        <input type="hidden" id="hRequestPerson" name="RequestPerson" value="@Model.RequestPerson" />
                                        <table style="margin: 1px">
                                            <tr id="trCommon">
                                                <td style="width: 95px; text-align: right">本次申请金额</td>
                                                <td>
                                                    <input id='ApprovalMoney' name='ApprovalMoney' class='easyui-numberbox' value='@Model.ApprovalMoney' style='width: 180px;' data-options="min:0" />
                                                </td>
                                                <td style="width: 75px; text-align: right">申请人</td>
                                                <td>
                                                    @Html.TextBoxFor(m => m.RequestPersonName, new { @readonly = "true", @style = "width:175px;" })
                                                </td>
                                                <td style="width: 90px; text-align: right">申请时间</td>
                                                <td>
                                                    @Html.TextBoxFor(m => m.RequestDate, new { @readonly = "true", @style = "width:175px;" })
                                                </td>
                                                <td style="width: 90px; text-align: right">支付编号</td>
                                                <td>
                                                    @Html.TextBoxFor(m => m.PayNum, new { @style = "width:175px;" })
                                                </td>
                                            </tr>
                                            <tr id="trConstruction">
                                                <td style="width: 95px; text-align: right">本次申请金额 </td>
                                                <td>
                                                    <input type="hidden" id="hApprovalMoney" name="ApprovalMoney" value="@Model.ApprovalMoney" />
                                                    @Html.TextBoxFor(m => m.ContractStagesStr, new { @readonly = "true", @style = "width:150px;" })
                                                    <a href="#" id="btnSelectConstructionContractEstimate" class="easyui-linkbutton" data-options="plain:true" onclick="SelectConstructionContractEstimate();">计量数据</a>
                                                    <a href="#" id="btnUpdateConstructionContractEstimate" class="easyui-linkbutton" data-options="plain:true" onclick="UpdateConstructionContractEstimate();">更新计量数据</a>
                                                </td>
                                                <td style="width: 75px; text-align: right">申请人</td>
                                                <td>
                                                    @Html.TextBoxFor(m => m.RequestPersonName, new { @readonly = "true", @style = "width:155px;" })
                                                </td>
                                                <td style="width: 90px; text-align: right">申请时间</td>
                                                <td>
                                                    @Html.TextBoxFor(m => m.RequestDate, new { @readonly = "true", @style = "width:155px;" })
                                                </td>
                                                <td style="width: 90px; text-align: right">支付编号</td>
                                                <td>
                                                    @Html.TextBoxFor(m => m.PayNum, new { @style = "width:155px;" })
                                                </td>
                                            </tr>
                                            <tr style="height: 60px">
                                                <td style="width: 95px; text-align: right">申请依据</td>
                                                <td colspan="7">
                                                    <textarea id="RequeatReason" name="RequeatReason">@Model.RequeatReason</textarea>
                                                </td>
                                            </tr>
                                            <tr style="height: 60px">
                                                <td style="width: 95px; text-align: right">附件</td>
                                                <td colspan="7">
                                                    @*<textarea id="Attachment" name="Attachment" style="width: 750px;">@Model.Attachment</textarea>*@
                                                    <a href='javascript:void(0)' class='easyui-linkbutton' onclick='$.Upload($("#hID").val(), "ContractManagement/ContractExpenseList/Attachment")' data-options='plain:true,iconCls:"icon-blue_lego"'>附件操作</a>
                                                </td>
                                            </tr>
                                        </table>
                                    </form>
                                </div>
                                <div region="center" border="false">
                                    <div class="easyui-layout" fit="true">
                                        <div region="north" title="已办列表" style="width: auto; height: 400px; padding: 1px;">
                                            <table id="myDataGrid" fit="true"></table>
                                        </div>
                                        <div region="center" border="false">
                                            <div class="easyui-layout" fit="true">
                                                <div region="north" title="传阅列表" style="width: auto; height: 200px; padding: 1px;">
                                                    <table id="myCirculatedDataGrid" fit="true"></table>
                                                </div>
                                                <div region="center" title="已阅列表" style="width: auto; height: 100px; padding: 1px;">
                                                    <table id="myReceiptDataGrid" fit="true"></table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div title="流程图" data-options="iconCls:'icon-none'" style="padding: 10px;">
            <div style="width: 100%; height: 5%;">
                <img alt="" src="../../images/workflow.bmp" />
            </div>
            <div id="graphContainer" style="overflow-y: scroll; width: 100%; height: 95%; background: url('../../images/grid.gif'); cursor: default;">
            </div>
        </div>
        <div title="详细数据" data-options="iconCls:'icon-none'" style="padding: 10px;">
            <div id="divExpenseRequestDetail" class="easyui-tabs" fit="true" data-options="onSelect:PreviewCharts">
                <div title="中期价款计量支付表（支表一）" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
                    <table class="easyui-datagrid" id="tbFirstTopList" style="height: 127px; width: 1230px;"></table>
                    <table class="easyui-datagrid" id="tbFirstBottomList" style="height: 252px; width: 1230px; "></table>
                    <table class="easyui-datagrid" id="tbFirstCutPaymentList" style="height: 102px; width: 1230px; "></table>
                </div>
                <div title="工程进度表（支表二）" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
                    <div id="chartsContainer" style="overflow-y: scroll; width: 100%; height: 450px;"></div>
                    <div style="min-width: 1200px; overflow: auto; padding-top: 50px; ">
                        <table class="easyui-datagrid" id="tbSecondList" style="width: auto; height: 250px;"></table>
                    </div>
                </div>
                <div title="工程清单计量汇总表（支表三）" data-options="iconCls:'icon-reload',closable:true" style="padding:10px;">
                    <table class="easyui-datagrid" id="tbThirdList" fit="true"></table>
                </div>
            </div>
        </div>
    </div>
    <div id="expenseWindow"></div>
